<template>
  <div>
    <div class="box">
      <span style="white-space: pre-wrap" class="content">{{
        billboard.content
      }}</span>
    </div>
    <div class="columns">
      <div class="column is-three-quarters">
        <PostList></PostList>
      </div>
      <div class="column">
        <CardBar></CardBar>
      </div>
    </div>
  </div>
</template>

<script>
import { getBillboard } from "@/api/billboard";
import CardBar from "@/view/card/CardBar";
import PostList from "@/view/post/Index";

export default {
  name: "Home",
  components: { CardBar, PostList },
  data() {
    return {
      billboard: {
        content: "",
      },
    };
  },
  created() {
    this.fetchBillboard();
  },
  methods: {
    async fetchBillboard() {
      getBillboard().then((value) => {
        const { data } = value;
        this.billboard = data;
      });
    },
  },
};
</script>

<style>
</style>